<template>
  <div class="main-wrapper">
    <side-bar :mobileShow="sideBar.show" @linkClick="sideBar.show = false" />
    <Button class="side-bar-toggle" type="black" @click="sideBarToggle">
      <i v-if="!sideBar.show" class="iconfont icon-caidan"></i>
      <i v-else class="iconfont icon-cuowu"></i>
    </Button>
    <div class="container">
      <router-view/>
      <div class="footer">
        © 2018 - 2020  阿炸克斯  <a target="_blank" href="http://www.miitbeian.gov.cn/">冀ICP备16025784号</a>
      </div>
    </div>
  </div>
</template>
<script>
import SideBar from '../components/SideBar'
import Login from '../components/login'
export default {
  name: 'Main',
  components: {
    SideBar,
    Login
  },
  data () {
    return {
      sideBar: {
        show: false
      }
    }
  },
  methods: {
    sideBarToggle () {
      this.sideBar.show = !this.sideBar.show
    }
  }
}
</script>

<style lang="scss">
body{
  overflow-y: scroll;
}
</style>
